var paper = Raphael("raphael-svg-container", 800, 600);

function spiral(centerX, centerY, spiralRatio, size)
{
    var centralPoint = "M" + centerX + ' ' + centerY,
        spiralPoints = [];

    spiralPoints.push(centralPoint);

    for (var i = 0; i < size; i++)
    {
        var angle = i * Math.PI / 180,
            x = centerX + (0 + spiralRatio * angle) * Math.cos(angle),
            y = centerY + (0 + spiralRatio * angle) * Math.sin(angle);

        spiralPoints.push('L ' + x + ' ' + y);
    }

    return spiralPoints.join(' ');
}

var spiral = paper.path(spiral(300, 300, 9, 1440));